package com.mgface.framework.springcloud.controller;

import com.mgface.framework.springcloud.entity.User;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RestController;

import java.math.BigDecimal;

/**
 * @author wanyuxiang
 * @version 1.0
 * @project ms-discovery-eureka-client
 * @create 2017-04-10 18:15
 **/
@RestController
public class UserController {

    @GetMapping("/simple/{id}")
    public User findById(@PathVariable Long id) {
        User u = new User();
        u.setId(id);
        u.setName("wyx");
        u.setAge(new Short("12"));
        u.setBalance(new BigDecimal("123"));
        u.setUsername("123admin");
        return u;

    }
}
